﻿@model Inscriptionem.Models.Blog.Views.Controls.HorizontalMenuViewModel

<ul id="menu-menu-2" class="navi-secondary navis">
@{
    if (Model.Categories.Any())
    {
        foreach (var category in Model.Categories)
        { 
            <text>
            <li class="menu-item menu-item-type-taxonomy menu-item-object-category @(category.ID == Model.SelectedItemID ? "current-menu-item": string.Empty)">
                <a href="/@Model.Language/@Model.Section/Category/@(category.ID)">@(category.Name)</a>
            </li>
            </text>    
        }
    }
    else if (Model.Pages.Any())
    {
        foreach (var page in Model.Pages)
        { 
            <text>
            <li class="menu-item menu-item-type-taxonomy menu-item-object-category @(page.ID == Model.SelectedItemID ? "current-menu-item": string.Empty)">
                <a href="/@Model.Language/@Model.Section/Page/@(page.ID)">@(page.Title)</a>
            </li>
            </text>    
        }
    }
}
</ul>